package com.yungui.rabbitmq.entity;

import com.alibaba.fastjson.JSONObject;

import java.util.Map;
import java.util.TreeMap;

public class LoggerInfoUtil {
    private Map<String,Object> loggerInfoContent = new TreeMap<>();
    private static LoggerInfoUtil loggerInfo;
    private LoggerInfoUtil() {

    }
    public static LoggerInfoUtil getInstance(){
        loggerInfo = new LoggerInfoUtil();
        return loggerInfo;
    }
    public LoggerInfoUtil buildLoggerInfo(String key,Object value){
        loggerInfoContent.put(key,value);
        return this;
    }
    @Override
    public String toString() {
        return JSONObject.toJSONString(loggerInfoContent);
    }
}
